﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using QualityRpt.Dao;
using QualityRpt.Utils;

namespace QualityRpt.Service
{
    public class SysLogsService:BaseService
    {
        private static ISysLogsDao _impDao = null;
        static SysLogsService()
        {
            _impDao = CreateDaoInstance("ISysLogsDao") as ISysLogsDao;
        }
        public static DataTable GetSchema()
        {
            DataTable rtTable = _impDao.GetList("ID=0");
            return rtTable.Clone();
        }
        public static DataRow Save(DataRow row)
        {
            return _impDao.Save(row);
        }
        public static DataRow Update(DataRow row)
        {
            return _impDao.Update(row);
        }
        public static DataRow Get(long id)
        {
            return _impDao.Get(id);
        }
        public static void Delete(long id)
        {
            _impDao.Delete(id);
        }
        public static DataTable GetList(string where)
        {
            return _impDao.GetList(where);
        }
        public static DataTable GetList(string where, string sort)
        {
            return _impDao.GetList(where, sort);
        }
        public static DataTable GetList(PageUtils pu,string where, string sort)
        {
            return _impDao.GetPageList(pu, where, sort);
        }
        public enum LOGSource
        {
            SYS = 0,//系统自身
            JOB = 2,//任务产生
            RawDataImport = 3,//数据导入产生
        }
    }
}
